package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;


/**
 * 发票抬头
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("invoice_title")
public class InvoiceTitle {
    @Column(name = "id",isAutoIncrement = true,isKey = true)
    Long id;

    /**
     * 抬头类型 1公司 2个人
     */
    @Column(name = "title_type",comment = "抬头类型 1公司 2个人")
    Short titleType;

    /**
     * 公司名称
     */
    @Column(name = "company_name",comment = "公司名称")
    String companyName;

    /**
     * 税号
     */
    @Column(name = "tax_num",comment = "税号")
    String taxNum;

    /**
     * 注册地址
     */
    @Column(name = "reg_address",comment = "注册地址")
    String regAddress;

    /**
     * 注册电话
     */
    @Column(name = "reg_phone",comment = "注册电话")
    String regPhone;

    /**
     * 开户银行
     */
    @Column(name = "bank_name",comment = "开户银行")
    private String bankName;

    /**
     * 银行账号
     */
    @Column(name = "bank_account",comment = "银行账号")
    private String bankAccount;

    @Column(name = "is_default",comment = "是否默认")
    private Boolean isDefault;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creator_user_id")
    private Long creatorUserId;

    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @Column(name = "uid",comment = "用户id")
    Long uid;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
